package com.probox.common.entity.domain.order.vo;

import com.probox.common.entity.domain.product.ProductInfo;
import com.probox.common.entity.vo.proboxService.BalanceItemVo;
import com.probox.customer.api.domain.CustomerVo;
import com.probox.common.entity.domain.order.OrderShopCart;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ApiModel("订单结算参数")
public class OrderSettlementVo implements java.io.Serializable  {
    //待结算的购物车ID
    @ApiModelProperty(value = "购物车ID，用来结算")
    private List<Long> cartList;

    //物流方式
    private String deliverMethod;

    //支付方式
    @ApiModelProperty(value = "支付方式，wechat为微信")
    private String payMethod;

    @ApiModelProperty(value = "买家留言")
    //买家留言
    private String buyerMsg;

    @ApiModelProperty(value = "收货地址")
    //收货地址
    private Long addressId;

    @ApiModelProperty(value = "金币支付")
    //余额支付
    private Long balance;

    @ApiModelProperty(value = "金币扣除明细")
    private List<BalanceItemVo> balanceDetail;

    @ApiModelProperty(value = "配送方式")
    //配送方式
    private String shipMethod;

    @ApiModelProperty(value = "优惠券详情ID")
    //优惠券ID
    private Long couponId;

    @ApiModelProperty(value = "红包支付，保留字段")
    //红包，保留字段
    private Long redBag;

    @ApiModelProperty(value = "积分支付")
    //积分支付，兑换的积分（用户的积分）
    private Long score;

    @ApiModelProperty(value = "发票ID")
    //发票
    private Long invoiceId;

    @ApiModelProperty(value = "支付订单号(继续支付时，必传)")
    private String parentOrderNo;

    @ApiModelProperty(value = "会员级别ID(充值会员必传)")
    private Long levelId;

    @ApiModelProperty(value = "充值套餐活动ID(充值套餐必传)")
    private Long activityUid;

    @ApiModelProperty(value = "自定义充值金额(非套餐充值时，必传)")
    private BigDecimal packagesPrice;

    /**********************以上的字段在结算时均可由前端传递***********************************/

    /**********************以下字段均由后台自动计算*******************************************/

    //会员折扣金额
    private Long discountAmount;
    //折扣率，后端计算
    private Long discountRate;

    //客户ID
    private Long customerId;

    private String customerName;

    private String phone;

    //店铺或平台ID
    private Long platformId;

    private String platSource;

    /**
     * 订单类型(0商品购买/1充值会员/2充值余额)
     */
    private String isRecharge;

    //优惠金额，后端计算，前端不用传参
    private Long couponAmount;
    //优惠券折扣,后端计算，前端不用传参
    private Long couponRate;
    //商品总额
    private Long shopAmount;
    //非活动商品总额
    private Long normalShopAmount;
    //邮费，后端计算，前端不用传参
    private Long freight;
    //总积分，后端计算，前端不用传参，结算总积分
    private Long scoreAmount;

    //免邮费标志
    private Boolean freeFreight = Boolean.FALSE;

    //超时时间，后端计算，前端无需传参
    private Date expireDate;

    //实际充值余额
    private Long rechargePrice;

    //客户的信息
    private CustomerVo customerInfo;

    //购物车列表详细内容
    private List<OrderShopCart> carts;

    //门店ID
    private Long storeId;

    //充值项目ID
    private Long rechargeId;

    //兑换记录ID
    private Long exchangeId;

    //会员折扣标志
    private boolean memberDiscount;

    //会员级别
    private Long memberGrade = 0L;

    //可以使用金币支付金额
    private Long canUseGoldCionAmount = 0L;
    //可以使用银币支付金额
    private Long canUseSilverCionAmount = 0L;
    //可以使用优惠券支付金额
    private Long canUseCouponAmount = 0L;

    //订单ID
    private Long orderId;

    private ProductInfo productInfo;
    private String orderType;

    private boolean isBatch = false;
}
